Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Here is a hex to ascii conversion function

This only works for the case of a simple ASCII string that is represented as a string of hex. It does not work for UTF-8, UTF-16, or any other character set.




Public Function HexStr2Str(str1 As String) As String
' Converts string <str1> with hex values into regular string
' Assumes hex string is simple ASCII. Does not handle UTF-16 or UTF-8
' E.g. "414243" will be converted into "ABC"
Dim i As Integer
Dim b As Byte
Dim nChar As Integer
Dim str2 As String

nChar = Len(str1) \ 2
For i = 0 To nChar - 1
b = CInt("&H" & Mid(str1, i * 2 + 1, 2))
str2 = str2 + Chr(b)
Next

HexStr2Str = str2

End Function


-rich


Feedback response number WEBB8VK5AN created by ~Ned Nimfanakonyoopsi on 06/24/2012

SAFE.ID & Windows 7 issue (~Laura Xanwepul... 23.Jun.12)
. . Here is a hex to ascii conversion f... (~Ned Nimfanakon... 24.Jun.12)
. . . . Thank you Rich, I will try that (~Laura Xanwepul... 25.Jun.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS